Skip to content

Split parts over 16-part machines, let held keys go on stop, and limit the rate per port map - #2

Merged
hsshss merged 3 commits into
mainfrom
part-splitter
Oct 9, 2026
Merged

hsshss merged 3 commits into
mainfrom
part-splitter

Conversation

@hsshss

@hsshss hsshss commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Port maps learn two things about the machines on their ports, and stopping a song stops leaving parts broken.

Split a multi-part module's parts over 16-part machines

A port map can now say that each of its ports leads to a 16-part module of its own. SC-88 and SC-88Pro songs reach their second part group with 50 xx xx and let its parts listen to port A (CHANNEL MSG RX PORT); XG songs address parts 17 and up by part number. With the option on, PartSplitter lays these out over the ports: channel messages follow a table of the port and channel each part receives, 5x addresses go to the partner port as 4x, MODE-1 patch common goes to both ports of the pair, and XG part numbers pick the port. Off by default, and then the splitter is not in the chain. glosa play --split does the same from the CLI.

Let go of the keys still down before silencing the channels

Stopping, pausing and seeking now send a Note Off for every key still down before All Sound Off and the rest. Sound Canvas VA breaks a part in mono mode whose note is ended by All Sound Off and All Notes Off: later notes on it sound as another tone, and a GS Reset does not mend it. After _BGG_PST.MID, which holds a note on its mono channel 2 when it gives way, _AKD_PMF.MID's hi-hat on channel 2 came out as a steady pitched tone instead of noise. Rendered through the plugin, letting the key go first keeps it noise.

Keep the transfer rate limit on each port map

The bytes-a-second limit is now a setting of the port map, put in force with the map chosen for each song, and Settings no longer has one for all maps. An old module that drops what comes too fast and an audio plugin that needs no limit are reached through different maps. The old setting is not taken over: an existing settings.yaml's transferRate is dropped, and every map starts unlimited.

Ports still wait for one another: events go out in the song's order across all ports, so a machine reached through two ports never sees a reset overtake the settings that follow it.

Testing

  • dotnet test in Release, 944 tests, with Brack beside and without.
  • The two songs above played back to back through the player with recording outputs, and port A's messages rendered through Sound Canvas VA, before and after the fix.
  • The port map and settings windows rendered headless in Japanese and English.

hsshss added 3 commits October 9, 2026 09:37
A port map can now say that each of its ports leads to a 16-part module of
its own. Songs for an SC-88 or SC-88Pro address the second part group with
50 xx xx and let its parts listen to port A (CHANNEL MSG RX PORT); XG songs
address parts 17 and up by part number. With the option on, PartSplitter
lays these out over the ports: channel messages are routed by a table of
the port and channel each part receives, 5x addresses go to the partner
port as 4x, MODE-1 patch common goes to both ports of the pair, and XG
part numbers pick the port.

Off by default, and then the splitter is not in the chain at all. The CLI's
play command takes --split for the same, and counts what it sends by port.
Stopping, pausing and seeking now send a Note Off for every key the
sequencer has pressed and not let go, before All Sound Off and the rest.
The keys are counted per port, channel and key from the note-ons and
note-offs sent, in an array made once so the playback loop still
allocates nothing. The Note Offs follow the same setting and rate cap as
the controllers they come before.

Sound Canvas VA breaks a part in mono mode whose note was ended by All
Sound Off and All Notes Off: later notes on it sound as another tone,
and a GS Reset does not mend it. After _BGG_PST.MID, which holds a note
on its mono channel 2 when it gives way, _AKD_PMF.MID's hi-hat on
channel 2 came out as a steady pitched tone instead of noise. Letting
the key go first keeps it noise, rendered through the plugin.

IMPLEMENTATION.md says why under "シーク".
The limit on the bytes a second handed to each port is now a setting of
the port map, beside splitting the parts, and is put in force with the
map chosen for each song. Settings no longer has one for all maps: an
old module that drops what comes too fast and an audio plugin that needs
no limit are reached through different maps.

The setting kept for all maps before is not taken over. An old
settings.yaml's transferRate is read as an unknown key and dropped, so
every map starts unlimited. A map added copies the limit of the map
being edited, as it does its ports.

IMPLEMENTATION.md says where the limit is kept, and why.
@hsshss
hsshss merged commit e279775 into main Oct 9, 2026
6 checks passed
@hsshss
hsshss deleted the part-splitter branch October 14, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant